@extends('layouts.prize')
@section('pageTitle', '新建奖品')
@section('style')
    <link rel="stylesheet" href="/css/admin/validform_style.css">
    <style>

        /*meiyun*/
        .mgud {
            margin: 20px auto;
        }

        .mgb10 {
            margin-bottom: 10px;
        }

        .mgr30 {
            margin-right: 30px;
        }

        /*.main-panel {*/
            /*overflow: auto;*/
        /*}*/

        .card form [class*="col-"]:first-child {
            padding: 0 6px;
        }

        .card form [class*="col-"]:last-child {
            padding: 0 6px;
        }

        .template-active-img img {
            width: 100%;
            height: auto;
            overflow: hidden;
        }

        .template-active-img .user-template-btn {
            position: absolute;
            bottom: 20px;
            left: 50%;
            margin-left: -22px;
        }

        .template-active-img .template-qrcode {
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0;
            top: 0;
            background: rgba(0, 0, 0, .5);
            display: none;
        }

        .template-active-img:hover .template-qrcode {
            display: block
        }

        .form-control {
            z-index: auto !important;
        }

        .qrcodeSection{
            text-align: center;
        }
    </style>
@endsection
@section('content')
    {{--@component('components.web.sidemenu')@endcomponent    content-full-width--}}
    <div class="main-panel">
        <div class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="content">
                                <ul role="tablist" class="nav nav-tabs">
                                    {{--<li class="active wx-tab" role="wechat">--}}
                                        {{--<a href="#wx" data-toggle="tab"><i class="glyphicon glyphicon-envelope"></i>--}}
                                            {{--微信红包</a>--}}
                                    {{--</li>--}}
                                    {{--<li class="zfb-tab" role="alipay">--}}
                                        {{--<a href="#zfb" data-toggle="tab"><i class="glyphicon glyphicon-envelope"></i>--}}
                                            {{--支付宝红包</a>--}}
                                    {{--</li>--}}
                                    <li class="coupon-tab" role="coupon">
                                        <a href="#coupon" data-toggle="tab"><i class="glyphicon glyphicon-yen"></i> 优惠券</a>
                                    </li>
                                    <li class="gift-tab" role="entity">
                                        <a href="#gift" data-toggle="tab"><i class="glyphicon glyphicon-gift"></i>
                                            实物</a>
                                    </li>

                                    <li class="buy-tab" role="buy">
                                        <a href="#buy" data-toggle="tab"><i
                                                    class="glyphicon glyphicon-shopping-cart"></i> 购买奖品</a>
                                    </li>
                                </ul>

                                <div class="tab-content">
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    </div>
@endsection
@section('script')
    <script src="/js/require.js"></script>
    <script src="/js/admin/jquery.qrcode.min.js"></script>
    <script src="/js/admin/Validform_v5.3.2_min.js"></script>
    <script src="/js/initValidform.js"></script>
    <script>
		$(document).ready(function () {
            //默认页面
			$.get('/web/prize/coupon', function (res) {
				$('.tab-content').html(res);
				$('.tab-pane').show();
				init();
			});

			$('ul.nav').find('li').each(function () {
				$(this).on('click', function () {
					$.get('/web/prize/' + $(this).attr('role'), function (res) {
						$('.tab-content').html(res);
						$('.tab-pane').show();
						init();
					});
				});
			});
		})
    </script>
@endsection